#include <iostream>
#include <vector>

using namespace std;

class Solution {
public:
    vector<int> maxDepthAfterSplit(string seq) {
        vector<int> ans(seq.size(), 0);
        for (int i = 0, depth = 0; i < seq.size(); i++) {
            switch (seq[i]) {
                case '(':
                    ans[i] = depth % 2;
                    depth++;
                    break;
                case ')':
                    depth--;
                    ans[i] = depth % 2;
                    break;
                default:
                    break;
            }
        }
        return ans;
    }
};